<template>
	<block v-if="!rediret">
	<navigator :url="'/pages/list/detail/detail?id='+item.id"   class="item">
		<view class="image">
		<image :src="item.logo" />
		<view class="icon"  v-if="item.zhekou">
			能省{{item.zhekou}}
		</view>
		</view>
		<view class="shuge"></view>
		<view class="title">
			<view class="first-title">{{item.title}}</view>
			<view class="title-park">{{item.park_name}}</view>
			<view class="tag">
				<view v-for="(tag,index) in item.tags" :key="index" class="tag-item">{{tag.name}}</view>
				
			</view>
			<view class="price" v-if="item.price!=0">
				<view class="price-text" > {{item.price}}</view>
				<view class="price-danwei"> 元/㎡</view>
				</view>
				<view class="price" v-if="item.price==0">
					<view class="price-text" > 面议</view>
					<view class="price-danwei"> </view>
				</view>
		</view>
	</navigator>
		
	</block>
	<block v-else>
	<navigator :url="'/pages/list/detail/detail?id='+item.id" open-type="redirect"  class="item">
		<view class="image">
		<image :src="item.logo" />
		<view class="icon" v-if="item.zhekou">
			能省{{item.zhekou}}
		</view>
		</view>
		<view class="shuge"></view>
		<view class="title">
			<view class="first-title">{{item.title}}</view>
			<view class="title-park">{{item.park_name}}</view>
			<view class="tag">
				<view v-for="(tag,index) in item.tags" :key="index" class="tag-item">{{tag.name}}</view>
				
			</view>
			<view class="price" v-if="item.price!=0">
				<view class="price-text" > {{item.price}}</view>
				<view class="price-danwei"> 元/㎡</view>
				</view>
				<view class="price" v-if="item.price==0">
					<view class="price-text" > 面议</view>
					<view class="price-danwei"> </view>
					</view>
		</view>
	</navigator>
	</block>
</template>

<script>
	export default {
		props:
		{
			item: {
				value: Object,
				default: {}
			},
			rediret:{
				value:Boolean,
				default:false
			}
		},
		data() {
			return {
			
			};
		},
	
	}
</script>

<style scoped lang="scss">
	.shuge{
		width: 24rpx;
	}
		.item{
			height: 260rpx;
			border-bottom: 2rpx solid #F3F3F3;
			padding-left: $padding-left;
			padding-right: $padding-right;
			display: flex;
			padding-top: 40rpx;
			justify-content: space-between;
			.image{
				width: 226rpx;
				height: 172rpx;
				border-radius: 10rpx;
				image{		
					width: 226rpx;
					height: 172rpx;
					border-radius: 10rpx;
				
				}
				.icon{
					position: relative;
					width: 62rpx;
					top: -180rpx;
					left: 8rpx;
					height: 62rpx;
					z-index: 10;
					font-size: 18rpx;
					font-weight: bold;
					display: flex;
					align-items: center;
					justify-content: center;
					text-align: center;
					color: #FFFFFF;
					background: url(https://wx1.sbimg.cn/2020/06/11/icon.png) no-repeat center; 
						background-size:62rpx 62rpx;
				}
			}
			
		
			.title{
				width: 419rpx;
				display: flex;
				flex-direction: column;
				.first-title{
					font-size: 28rpx;
					font-weight: 500;
					color: #494949;

			 text-overflow: -o-ellipsis-lastline;
			  overflow: hidden;
			  text-overflow: ellipsis;
			  display: -webkit-box;
			  -webkit-line-clamp: 2;
			  line-clamp: 2;
			  -webkit-box-orient: vertical;
					

				}
				.title-park{
					font-size:24rpx;
					color: #9A9BA0;
					line-height: 62rpx;				
				}
				.tag{
					display: flex;
					flex-wrap: wrap;
					.tag-item{
						display: flex;
						justify-content: center;
						align-items: center;
						width: 100rpx;
					
						margin-bottom: 11rpx;
						margin-right: 11rpx;
						height: 35rpx;
						font-size: 20rpx;
					
						color: #9A9BA0;
					
					
						background:#F7F7F7;
						border-radius:4rpx;
					}
				}
				
				.price{
					display: flex;
					
					.price-text{
						color:#DA3337;
						font-size:30rpx;
						line-height: 60rpx;
						font-weight: bold;
					}
					.price-danwei{
						color: #9A9BA0;
						font-size: 24rpx;
						line-height: 65rpx;
					}
				}
				
			}
			
		}
</style>
